Skip to content

refactor(@angular/build): deprecate ng-packagr builder and APIs - #34696

Merged
alan-agius4 merged 1 commit into
angular:mainfrom
alan-agius4:deprecate-ng-packagr-builder
Nov 12, 2026
Merged

alan-agius4 merged 1 commit into
angular:mainfrom
alan-agius4:deprecate-ng-packagr-builder

Conversation

@alan-agius4

Copy link
Copy Markdown
Collaborator

PR Checklist

PR Type

  • Refactoring (no functional changes, no api changes)

What is the current behavior?

The ng-packagr builder (@angular/build:ng-packagr) and its programmatic APIs (executeNgPackagrBuilder and NgPackagrBuilderOptions) are not marked as deprecated, and @angular-devkit/build-angular:ng-packagr recommends @angular/build:ng-packagr.

Issue Number: N/A

What is the new behavior?

  • Logs a runtime deprecation warning when executing @angular/build:ng-packagr recommending @angular/build:library.
  • Updates @angular-devkit/build-angular:ng-packagr deprecation warning to point directly to @angular/build:library.
  • Marks executeNgPackagrBuilder, NgPackagrBuilderOptions, and ng-packagr-related workspace model symbols as @deprecated across @angular/build, @angular-devkit/build-angular, and @schematics/angular, and updates public API goldens.

Does this PR introduce a breaking change?

  • Yes
  • No

DEPRECATED: The `ng-packagr` builder (`@angular/build:ng-packagr`) and its programmatic APIs (`executeNgPackagrBuilder` and `NgPackagrBuilderOptions`) are deprecated. Use the `@angular/build:library` builder instead.
@angular-robot angular-robot Bot added detected: deprecation PR contains a commit with a deprecation area: @angular/build labels Nov 12, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request deprecates the ng-packagr builders in favor of @angular/build:library. It updates public API goldens, builder configurations, schemas, and workspace models to mark them as deprecated, and adds runtime deprecation warnings. Additionally, tools/quicktype_runner.js is updated to support root-level deprecations in schemas. Feedback on the changes suggests correcting a deprecation JSDoc in builder.ts to remove an incorrect version reference ('v22.3') for consistency.

@alan-agius4 alan-agius4 added the target: minor This PR is targeted for the next minor release label Nov 12, 2026
@alan-agius4
alan-agius4 requested a review from clydin November 12, 2026 09:19
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Nov 12, 2026
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 12, 2026
@alan-agius4
alan-agius4 merged commit 2170cff into angular:main Nov 12, 2026
44 checks passed
@alan-agius4
alan-agius4 deleted the deprecate-ng-packagr-builder branch November 12, 2026 12:48
@alan-agius4

Copy link
Copy Markdown
Collaborator Author

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build detected: deprecation PR contains a commit with a deprecation target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants